﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Entitys.Messages
{
    [Serializable]
    public class ActionMsg
    {
        /// <summary>
        /// 函数名
        /// </summary>
        public string ActionName;

        /// <summary>
        /// 类名
        /// </summary>
        public string ClassName;
        //参数值
        public object[] Obj;

        /// <summary>
        /// 默认构造函数(没有他，反序列化会报错)
        /// </summary>
        public ActionMsg()
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="s">方法名</param>
        public ActionMsg(string s)
        {
            ActionName = s;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="s">方法名</param>
        /// <param name="className">类名</param>
        public ActionMsg(string s,string className)
        {
            ActionName = s;
            ClassName = className;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="s">方法名</param>
        /// <param name="className">类名</param>
        /// <param name="value">传递的值</param>
        public ActionMsg(string s, string className,object[] value)
        {
            ActionName = s;
            ClassName = className;
            Obj = value;
        }

        public static implicit operator ActionMsg(string s)
        {
            return new ActionMsg(s);
        }
    }

    /// <summary>
    /// 参数信息
    /// </summary>
    [Serializable]
    public class ParaInfo
    {
        public string Name;

        public object Value;
    }


}
